function zc() {
    var usname = document.querySelectorAll('input')[0].value
    var uspass = document.querySelectorAll('input')[1].value
    var qrpass = document.querySelectorAll('input')[2].value
    var emi = document.querySelectorAll('input')[3].value
    var ssj = document.querySelectorAll('input')[4].value
    localStorage.setItem('name', usname)
    localStorage.setItem('pass', uspass)
    localStorage.setItem('ppass', qrpass)
    localStorage.setItem('em', emi)
    localStorage.setItem('sj', ssj)

    if (usname == '') {
        alert('用户名不能为空')
    } else if (!rel.test(uspass)) {
        alert('密码格式有误')
    } else if (uspass != qrpass) {
        alert('确认密码和上面密码不同')
    } else if (!rel2.test(emi)) {
        alert('邮箱格式有误')
    } else if(!rel3.test(ssj)) {
        alert('手机号格式有误')
    } else {
        location.assign('../登录/登录.html')
    }
}